|
Loop Processes Action |
Declaration |
<AMLOOPPROCESSES RESULTVARIABLE="test
[variablename]" KEEPPATHS="yes/no" INCLUDE="test"
EXCLUDE="text" SORT="text [options]"> |
See Also |
Loop, End Loop, Loop Files, Loop Windows, Loop Expression, Loop Dataset, Loop List, Break |
Loops through the filenames of the processes (applications) that are currently running on the system. The variable specified in the Index parameter is updated with the process filename. With each successive loop, the next process filename is retrieved. The loop ends after all the process filenames have been retrieved or when a Break is encountered.
To perform an action on every process (application) open on the system.
Specifies an already created variable name that should be populated with the next process name on each successive loop.
Specifies that the folder path should be removed from the return value so that a filename only (the process name) is returned.
Specifies the wildcard mask that should be included in the loop. For example, if *notepad.exe was specified, the loop would only include processes with the name notepad.exe, in other words. all open notepads regardless of the document being displayed or the folder it was launched from. Standard wildcard characters * and ? are allowed.
Specifies the wildcard mask that should be excluded from the loop. For example, if *notepad.exe was specified, the loop would exclude all processes with the name notepad.exe. Standard wildcard characters * and ? are allowed.
Specifies whether a sort order should be applied to the values before the loop begins. For example, selecting "ascending" would return the process names in alphabetical order.
The Available Options Are:
none: The results are left in their natural order and not sorted.
ascending: The results sorted in ascending alphabetical order.
descending: The results sorted in descending alphabetical order.
Standard Error Handling Options
This action also includes the standard "Error Causes" and "On
Error" failure handling options/tabs
More on Error Handling Options
Variables and Expressions
All text fields allow the use of expressions by surrounding the expression
in percentage signs (example: %MYVARIABLE%, %Left('Text',2)%). To help
construct these expressions, a popup expression builder is available in
all these fields by pressing F2.
More on variables...
More on expressions...
More on the expression builder...
<!--- Close all notepad.exe processes --->
<AMVARIABLE NAME="currentprocess"></AMVARIABLE>
<AMLOOPPROCESSES RESULTVARIABLE="currentprocess" INCLUDE="*notepad.exe">
<AMENDPROCESS
PROCESS="%currentprocess%">
</AMLOOP>